package com.chezhujie.www.service;

import java.util.Date;
import java.util.Map;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chezhujie.www.domain.Czjexpress;
import com.chezhujie.www.persistence.CzjexpressMapper;
import com.chezhujie.www.utils.UUIDUtils;

/**
 * Created by 汤伟杰 on 2017/6/2.
 */
@Service
public class CzjexpressService extends BaseService{
    @Autowired
    private CzjexpressMapper czjexpressMappe;

	public Czjexpress getExpressByOrdercode(Map<String, Object> map) {
		return czjexpressMappe.getExpressByOrdercode(map);
	}

	public void insertCzjexpress(Czjexpress czjexpress) {
			if(StringUtils.isBlank(czjexpress.getExpressId())){
				czjexpress.setExpressId(UUIDUtils.getUUID());
				czjexpress.setCreatetime(new Date());
			}
			czjexpressMappe.insertCzjexpress(czjexpress);
	}

	public void updateCzjexpress(Czjexpress czjexpress) {
		czjexpressMappe.updateCzjexpress(czjexpress);
	}
    

}
